<%--
  Created by IntelliJ IDEA.
  User: dxy
  Date: 2025/1/5
  Time: 上午8:48
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>留言</title>
</head>
<body>
<div>
<%--    用于检查请求属性info是否不为空。如果不为空，则显示其内容--%>
    <c:if test="${not empty info}">${info}</c:if>
</div>
<h1>欢迎来到留言板</h1>
<form action="/AddMessageServlet" method="post"> <%--发送servlet请求--%>
    <label for="author">用户名：</label><input type="text" id="author" name="author" required><br>
    <label for="content">留言内容：</label><textarea id="content" name="content" required></textarea><br>
    <input type="submit" value="提交留言">
    <br>
    <a href="/index.jsp">返回主页</a>
</form>
</body>
</html>
